Guaranteeing the event order for multi-stage processing in distributed systems

ABSTRACT

Systems and methods for guaranteeing the event order for multi-stage processing in distributed systems are disclosed. In some examples, a warm-up period is used to accurately determine a starting point for ordered events of an event stream. Skip-beats may be utilized as dummy events so that the event processor does not wait too long for events that were filtered out at earlier stages.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a non-provisional application of, and claimsthe benefit and priority under 35 U.S.C. 119(e) of U.S. ProvisionalApplication No. 62/244,452, filed Oct. 21, 2015, entitled “GUARANTEEINGTHE EVENT ORDER FOR MULTI-STAGE PROCESSING IN DISTRIBUTED SYSTEMS,” theentire contents of which is incorporated herein by reference for allpurposes.

BACKGROUND

In traditional database systems, data is stored in one or more databasesusually in the form of tables. The stored data is then queried andmanipulated using a data management language such as a structured querylanguage (SQL). For example, a SQL query may be defined and executed toidentify relevant data from the data stored in the database. A SQL queryis thus executed on a finite set of data stored in the database.Further, when a SQL query is executed, it is executed once on the finitedata set and produces a finite static result. Databases are thus bestequipped to run queries over finite stored data sets.

A number of modern applications and systems however generate data in theform of continuous data or event streams instead of a finite data set.Examples of such applications include but are not limited to sensor dataapplications, financial tickers, network performance measuring tools(e.g. network monitoring and traffic management applications),clickstream analysis tools, automobile traffic monitoring, and the like.Such applications have given rise to a need for a new breed ofapplications that can process the data streams. For example, atemperature sensor may be configured to send out temperature readings.

Managing and processing data for these types of event stream-basedapplications involves building data management and querying capabilitieswith a strong temporal focus. A different kind of querying mechanism isneeded that comprises long-running queries over continuous unboundedsets of data. While some vendors now offer product suites geared towardsevent streams processing, these product offerings still lack theprocessing flexibility required for handling today's events processingneeds.

SUMMARY

The following portion of this disclosure presents a simplified summaryof one or more innovations, embodiments, and/or examples found withinthis disclosure for at least the purpose of providing a basicunderstanding of the subject matter. This summary does not attempt toprovide an extensive overview of any particular embodiment or example.Additionally, this summary is not intended to identify key/criticalelements of an embodiment or example or to delineate the scope of thesubject matter of this disclosure. Accordingly, one purpose of thissummary may be to present some innovations, embodiments, and/or examplesfound within this disclosure in a simplified form as a prelude to a moredetailed description presented later.

A further understanding of the nature of and equivalents to the subjectmatter of this disclosure (as well as any inherent or express advantagesand improvements provided) should be realized in addition to the abovesection by reference to the remaining portions of this disclosure, anyaccompanying drawings, and the claims.

In some examples, a method, a system, and a computer-readable medium maybe provided. The method, the system, and/or the computer-readable mediummay comprise determining a first event of a sequence of events that arereceived as part of an event stream, initializing a value of an eventcounter with a timestamp of the first event, and/or processingadditional events of the event stream. In some cases, the method,system, and/or computer-readable medium may also comprise identifying afiltered event of the event stream, generating a skip-beat for thefiltered event, and/or inserting the skip-beat into the event stream.Further, in some examples, the method, system, and/or computer-readablemedium may also comprise receiving subsequent events of the eventstream, identifying an out-of-order event of the event stream, and/orprocessing subsequent events in order of the timestamp associated witheach of the subsequent events independent of whether a next event in theevent stream is an actual event or a skip-beat. In some instances, themethod, system, and/or computer-readable medium may also comprisedetermining the first event by starting a timer, receiving a set ofevents of the sequence of events until the timer expires, re-sequencingthe set of events in chronological order, and identifying the firstevent as an event of the re-sequenced set with a highest timestamp.Additional events may be batched before the timer expired. The filteredevent may have been filtered out by an upstream stage. The actual eventmay comprise event data corresponding to the event stream.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to reasonably describe and illustrate those innovations,embodiments, and/or examples found within this disclosure, reference maybe made to one or more accompanying drawings. The additional details orexamples used to describe the one or more accompanying drawings shouldnot be considered as limitations to the scope of any of the claimeddisclosures, any of the presently described embodiments and/or examples,or the presently understood best mode of any innovations presentedwithin this disclosure.

FIG. 1 is a simplified illustration of a system that may incorporate anembodiment of the present disclosure.

FIG. 2 is a simplified block diagram of details for implementing anembodiment of the present disclosure.

FIG. 3 is a flowchart of a method for implementing an embodiment of thepresent disclosure.

FIG. 4 is a flowchart of a method for implementing an embodiment of thepresent disclosure.

FIG. 5 is a flowchart of a method for implementing an embodiment of thepresent disclosure.

FIG. 6 depicts a simplified diagram of a distributed system forimplementing some of the examples described herein, according to atleast one example.

FIG. 7 is a simplified block diagram of components of a systemenvironment by which services provided by the components of anembodiment system may be offered as cloud services, in accordance withsome of the examples described herein, according to at least oneexample.

FIG. 8 illustrates an exemplary computer system, in which variousembodiments of the present disclosure may be implemented in accordingwith some of the examples described herein, according to at least oneexample.

DETAILED DESCRIPTION

In Complex Event Processing platforms, to achieve correct results,events should be processed in the order of their application timestamp.If event ‘a’ was produced before event ‘b’ by the application, thenevent ‘a’ should be processed before ‘b’. For example, to identify adevice whose current temperature is greater than the previoustemperature, the data should be partitioned by device ID and processedin order. In some examples, the difference between current data andprevious data is defined by the timestamp of those events. Ensuring anordered processing of events is relatively easy in systems where data isingested from a single point. For example, a partition number for theevent can be identified, and the event can be placed on apartition-specific queue for processing. But in distributed systems,ordered processing of events is extremely complex, especially when datais ingested from any node in a cluster. In some cases, a few thingsshould happen to ensure ordered processing. (1) First the start counterwith the right sequence number or the timestamp should be initialized.(2) Second, it should be detected whether an event has arrived out oforder. (3) Third, the events that have been buffered but not yetprocessed should be re-sequenced. (4) Lastly, it should be determinedwhen to proceed, so as to not wait indefinitely for an older out ofsequence event to arrive. This can especially be the case in multi-stageprocessing, because they could have been filtered out by a previousprocessing stage in the pipeline. Through techniques of warm-ups andskip beats, this disclosure provides examples for processing events inorder, and in some examples, guaranteeing that events are processed inthe order they occur, even if the processing entails multiple stages.

In some examples, one feature of the present disclosure is to accountfor late events at the very beginning and on system startup. This may becalled the warm-up phase. In some examples, a clock is started when thesystem receives the very first event, and events are collected until theclock or timer expires. After the timer expires, events are re-sequencedand the event with the highest timestamp is used to initialize the valueof the counter “LAST_SEEN_TIMESTAMP” and the counter“NEXT_EXPECTED_TIMESTAMP” is set to LAST_SEEN_TIMESTAMP+1. Batchedevents are processed and the warm-up phase is complete. After thewarm-up phase, ordering is strictly enforced using the above twocounters.

Another feature of the present disclosure is to trigger a Skip-Beatusing the same timestamp as a filtered event. In multi-stage processing,it is feasible that an event is filtered out by an up-stream stage. Insuch cases the processing system (e.g., a complex event processing (CEP)engine) should not wait indefinitely and attempt event ordering becausethe filtered event would never arrive. To handle such cases, a Skip-Beatwith the same timestamp as the filtered application event can begenerated, and the system can propagate the same across all downstreamstages. The Skip-Beat is then used in place of the real event toguarantee ordering in an application that deploys multi-stageprocessing. Once the warm-up phase as described above is complete, theincoming events can processed in the correct order (e.g., subsequentevents are processed in order of the timestamp associated with each ofthe subsequent events); thus, guaranteeing ordered processing ofsubsequent events, using the following logic

If a real Event or a “Skip-Beat” arrives with the same timestamp as“NEXT_EXPECTED_TIMESTAMP”, the LAST_SEEN_TIMESTAMP is assigned the valueof NEXT_EXPECTED_TIMESTAMP and NEXT_EXPECTED_TIMESTAMP is incremented.

If a “Skip-Beat” or a “Real-Event” arrives with a timestamp that ishigher than NEXT_EXPECTED_TIMESTAMP, the event is added to a buffer anda Timer with pre-configured expiration interval is started and thebehavior below is implemented:

-   -   More incoming Events or Skip-Beats with timestamp higher than        NEXT_EXPECTED_TIMESTAMP are buffered as the timer continues to        run    -   When an incoming Event or Skip-Beat arrives with timestamp same        as NEXT_EXPECTED_TIMESTAMP, the timer is turned off, events in        the buffer is re-sequenced and processed. Please note that the        Skip-Beats will continue to be propagated.    -   When an incoming Event or Skip-Beat arrives with timestamp lower        than NEXT_EXPECTED_TIMESTAMP, the event or beat is discarded as        out-of-band. Again increasing the length of the warm-up phase        can reduce the possibility of this scenario.    -   When the timer expires, buffered events are re-sequenced and        processed while continuing to propagate the Skip-Beats.

These techniques allow for proper initialization of the counters andaccount for events that may be filtered by an upstream stage in theprocessing pipeline.

In some examples, a query may be tasked with determining whether anevent is higher or lower with respect to an earlier event. For example,whether the temperature has increased in the last hour (or some othertime period). However, in order to accurately answer this question, theevents (e.g., related to temperature) must be processed in the sameorder in which they were produced. In a single processor system, or asystem that ingests data from a single point, this can be relativelyeasy by merely queueing events as they come in, and processing them inorder. However, in a distributed system, events flow through multiplenodes before they arrive at event processors, and they could be out oforder.

As described, one solution is to initialize a start counter with anaccurate value so that the event processor has an accurate beginningpoint. Otherwise, when a system boots up (e.g., after a restart or areboot), it cannot be assumed that the event processors will start withthe correct value. As such, when the system starts up, a warm-up periodmay be used to determine which event is the appropriate starting event.This starting event may then be used to begin the sequencing. Then, oncethe processing of events begins, the system needs to be able to detectwhen something is out of sequence. In some cases, once it is determinedthat the events are out of sequence, the events must be reordered.However, it may not always be possible to guarantee that an out ofsequence event will ever arrive. For example, in some cases, events maybe filtered out by an earlier node or process in the distributed system.

In some examples, “skip beats” (e.g., dummy events that are propagatedthrough the system) are used to indicate that the event processor doesnot need to wait for the particular event. For example, the skip beatmay indicate that the event may never arrive. In some cases, if an eventhas been filtered out by an earlier node, a “skip beat” can be insertedinto the stream with the appropriate time stamp (e.g., the same timestamp that corresponded to the filtered event). When the downstreamprocessor receives the “skip beat,” it will be treated as the missingevent (e.g., the event that the processor is waiting for of the eventthat appears to be out of order), and the processor will move on withprocessing the next event when it is detected. In some examples, anevent may be filtered out due to a condition that is processed at anearlier node. For example, if the query is only identifying temperatureincreases that are above a particular threshold (e.g., greater than 70degrees or the like), all events associated with temperatures below 60may be filtered out. When the event is filtered out, a “skip beat” maybe inserted into the stream in place of the filtered event. When theevent processor identifies the “skip beat,” it will stop waiting forthat event.

The event processor may not be aware of which events have been filteredout up-stream. So, if it listens for “skip beat” events, it will learnwhich events it does not need to process in order (or at all in thiscase). As noted, the “skip beat” event is essentially a dummy event inplace of the real event. So, essentially, if the event processor wantsto be able to guarantee accurate ordered event processing, the systemmust employ at least the above-referenced warm-up period and the use of“skip beats.” Additionally, it may be important to be able to detectwhen events are out of order.

In some examples, mechanisms to guarantee the event order formulti-stage processing in distributed systems may be provided. Ingeneral, a continuous data stream (also referred to as an event stream)may include a stream of data or events that may be continuous orunbounded in nature with no explicit end. Logically, an event or datastream may be a sequence of data elements (also referred to as events),each data element having an associated timestamp. A continuous eventstream may be logically represented as a bag or set of elements (s, T),where “s” represents the data portion, and “T” is in the time domain.The “s” portion is generally referred to as a tuple or event. An eventstream may thus be a sequence of time-stamped tuples or events.

In some aspects, the timestamps associated with events in a stream mayequate to a clock time. In other examples, however, the time associatedwith events in an event stream may be defined by the application domainand may not correspond to clock time but may, for example, berepresented by sequence numbers instead. Accordingly, the timeinformation associated with an event in an event stream may berepresented by a number, a timestamp, or any other information thatrepresents a notion of time. For a system receiving an input eventstream, the events arrive at the system in the order of increasingtimestamps. There could be more than one event with the same timestamp.

In some examples, an event in an event stream may represent anoccurrence of some worldly event (e.g., when a temperature sensorchanged value to a new value, when the price of a stock symbol changed)and the time information associated with the event may indicate when theworldly event represented by the data stream event occurred.

For events received via an event stream, the time information associatedwith an event may be used to ensure that the events in the event streamarrive in the order of increasing timestamp values. This may enableevents received in the event stream to be ordered based upon theirassociated time information. In order to enable this ordering,timestamps may be associated with events in an event stream in anon-decreasing manner such that a later-generated event has a latertimestamp than an earlier-generated event. As another example, ifsequence numbers are being used as time information, then the sequencenumber associated with a later-generated event may be greater than thesequence number associated with an earlier-generated event. In someexamples, multiple events may be associated with the same timestamp orsequence number, for example, when the worldly events represented by thedata stream events occur at the same time. Events belonging to the sameevent stream may generally be processed in the order imposed on theevents by the associated time information, with earlier events beingprocessed prior to later events.

The time information (e.g., timestamps) associated with an event in anevent stream may be set by the source of the stream or alternatively maybe set by the system receiving the stream. For example, in certainembodiments, a heartbeat may be maintained on a system receiving anevent stream, and the time associated with an event may be based upon atime of arrival of the event at the system as measured by the heartbeat.It is possible for two events in an event stream to have the same timeinformation. It is to be noted that while timestamp ordering requirementis specific to one event stream, events of different streams could bearbitrarily interleaved.

An event stream has an associated schema “S,” the schema comprising timeinformation and a set of one or more named attributes. All events thatbelong to a particular event stream conform to the schema associatedwith that particular event stream. Accordingly, for an event stream (s,T), the event stream may have a schema ‘S’ as (<time_stamp>,<attribute(s)>), where <attributes> represents the data portion of theschema and can comprise one or more attributes. For example, the schemafor a stock ticker event stream may comprise attributes <stock symbol>,and <stock price>. Each event received via such a stream will have atime stamp and the two attributes. For example, the stock ticker eventstream may receive the following events and associated timestamps:

. . .

(<timestamp_N>, <NVDA, 4>)

(<timestamp_N+1>, <ORCL, 62>)

(<timestamp_N+2>, <PCAR, 38>)

(<timestamp_N+3>, <SPOT, 53>)

(<timestamp_N+4>, <PDCO, 44>)

(<timestamp_N+5>, <PTEN, 50>)

. . .

In the above stream, for stream element (<timestamp_N+1>, <ORCL, 62>),the event is <ORCL, 62> with attributes “stock_symbol” and“stock_value.” The timestamp associated with the stream element is“timestamp_N+1”. A continuous event stream is thus a flow of events,each event having the same series of attributes.

As noted, a stream may be the principle source of data that CQL queriesmay act on. A stream S may be a bag (also referred to as a “multi-set”)of elements (s, T), where “s” is in the schema of S and “T” is in thetime domain. Additionally, stream elements may be tuple-timestamp pairs,which can be represented as a sequence of timestamped tuple insertions.In other words, a stream may be a sequence of timestamped tuples. Insome cases, there may be more than one tuple with the same timestamp.And, the tuples of an input stream may be requested to arrive at thesystem in order of increasing timestamps. Alternatively, a relation(also referred to as a “time varying relation,” and not to be confusedwith “relational data,” which may include data from a relationaldatabase) may be a mapping from the time domain to an unbounded bag oftuples of the schema R. In some examples, a relation may be anunordered, time-varying bag of tuples (i.e., an instantaneous relation).In some cases, at each instance of time, a relation may be a boundedset. It can also be represented as a sequence of timestamped tuples thatmay include insertions, deletes, and/or updates to capture the changingstate of the relation. Similar to streams, a relation may have a fixedschema to which each tuple of the relation may conform. Further, as usedherein, a continuous query may generally be capable of processing dataof (i.e., queried against) a stream and/or a relation. Additionally, therelation may reference data of the stream.

In some examples, business intelligence (BI) may help drive and optimizebusiness operations at particular intervals (e.g., on a daily basis insome cases). This type of BI is usually called operational businessintelligence, real-time business intelligence, or operationalintelligence (OI). Operational Intelligence, in some examples, blurs theline between BI and business activity monitoring (BAM). For example, BImay be focused on periodic queries of historic data. As such, it mayhave a backward-looking focus. However, BI may also be placed intooperational applications, and it may therefore expand from a merestrategic analytical tool into the front lines in business operations.As such, BI systems may also be configured to analyze event streams andcompute aggregates in real time.

Additionally, in some examples, OI is a form of real-time dynamic,business analytics that can deliver visibility and insight into businessoperations. OI is often linked to or compared with BI or real-time BI,in the sense that both help make sense out of large amounts ofinformation. But there are some basic differences: OI may be primarilyactivity-centric, whereas BI may be primarily data-centric.Additionally, OI may be more appropriate for detecting and responding toa developing situation (e.g., trend and pattern), unlike BI which maytraditionally be used as an after-the-fact and report-based approach toidentifying patterns.

In some examples, a business event analysis and monitoring (BEAM) systemmay include a CQL engine to process and/or receive in-flight data. Forexample, a CQL engine may be an in-memory real-time event processingengine configured to query or otherwise process incoming real-timeinformation (e.g., BI or OI). The CQL engine may utilize or understandtemporal semantics and be configured to allow definition of a window ofdata to process. Utilizing a CQL engine may, in some cases, involvealways running a query on incoming data.

In some aspects, the CQL engine may include a full blown query language.As such, a user may specify computations in terms of a query.Additionally, the CQL engine may be designed for optimizing memory,utilizing query language features, operator sharing, rich patternmatching, rich language constructs, etc. Additionally, in some examples,the CQL engine may process both historical data and streaming data. Forexample, a user can set a query to send an alert when California saleshit above a certain target. Thus, in some examples, the alert may bebased at least in part on historical sales data as well as incoming live(i.e., real-time) sales data.

In some examples, the CQL engine or other features of the belowdescribed concepts may be configured to combine a historical context(i.e., warehouse data) with incoming data in a real-time fashion. Thus,in some cases, the present disclosure may describe the boundary ofdatabase stored information and in-flight information. Both the databasestored information and the inflight information may include BI data. Assuch, the database may, in some examples, be a BI server or it may beany type of database. Further, in some examples, the features of thepresent disclosure may enable the implementation of the above featureswithout users knowing how to program or otherwise write code. In otherwords, the features may be provided in a feature-rich user interface(UI) or other manner that allows non-developers to implement thecombination of historical data with real-time data.

The techniques described above and below may be implemented in a numberof ways and in a number of contexts. Several example implementations andcontexts are provided with reference to the following figures, asdescribed below in more detail. However, the following implementationsand contexts are but a few of many.

FIG. 1 depicts a simplified example system or architecture 100 in whichtechniques for guaranteeing event order may be implemented. Inarchitecture 100, one or more users 102 (e.g., account holders) mayutilize user computing devices 104(1)-(N) (collectively, “user devices104”) to access one or more service provider computers 106 via one ormore networks 108. In some aspects, the service provider computers 106may also be in communication with one or more streaming data sourcecomputers 110 and/or one or more databases 112 via the networks 108. Forexample, the users 102 may utilize the service provider computers 106 toaccess or otherwise manage data of the streaming data source computers110 and/or the databases 112 (e.g., queries may be run against either orboth of 110, 112). The databases 112 may be relational databases, SQLservers, or the like and may, in some examples, manage historical data,event data, relations, archived relations, or the like on behalf of theusers 102. Additionally, the databases 112 may receive or otherwisestore data provided by the streaming data source computers 110. In someexamples, the users 102 may utilize the user devices 104 to interactwith the service provider computers 106 by providing queries (alsoreferred to as “query statements”) or other requests for data (e.g.,historical event data, streaming event data, etc.). Such queries orrequests may then be executed by the service provider computers 106 toprocess data of the databases 112 and/or incoming data from thestreaming data source computers 110. Further, in some examples, thestreaming data source computers 110 and/or the databases 112 may be partof an integrated, distributed environment associated with the serviceprovider computers 106.

In some examples, the networks 108 may include any one or a combinationof multiple different types of networks, such as cable networks, theInternet, wireless networks, cellular networks, intranet systems, and/orother private and/or public networks. While the illustrated examplerepresents the users 102 accessing the service provider computers 106over the networks 108, the described techniques may equally apply ininstances where the users 102 interact with one or more service providercomputers 106 via the one or more user devices 104 over a landlinephone, via a kiosk, or in any other manner. It is also noted that thedescribed techniques may apply in other client/server arrangements(e.g., set-top boxes, etc.), as well as in non-client/serverarrangements (e.g., locally stored applications, etc.).

The user devices 104 may be any type of computing device such as, butnot limited to, a mobile phone, a smart phone, a personal digitalassistant (PDA), a laptop computer, a desktop computer, a thin-clientdevice, a tablet PC, etc. In some examples, the user devices 104 may bein communication with the service provider computers 106 via thenetworks 108, or via other network connections. Further, the userdevices 104 may also be configured to provide one or more queries orquery statements for requesting data of the databases 112 (or other datastores) to be processed.

In some aspects, the service provider computers 106 may also be any typeof computing devices such as, but not limited to, mobile, desktop,thin-client, and/or cloud computing devices, such as servers. In someexamples, the service provider computers 106 may be in communicationwith the user devices 104 via the networks 108, or via other networkconnections. The service provider computers 106 may include one or moreservers, perhaps arranged in a cluster, as a server farm, or asindividual servers not associated with one another. These servers may beconfigured to perform or otherwise host features described hereinincluding, but not limited to, the management of archived relations,configurable data windows associated with archived relations, and/oraccurately counting change events associated with managing archivedrelations described herein. Additionally, in some aspects, the serviceprovider computers 106 may be configured as part of an integrated,distributed computing environment that includes the streaming datasource computers 110 and/or the databases 112.

In one illustrative configuration, the service provider computers 106may include at least one memory 136 and one or more processing units (orprocessor(s)) 138. The processor(s) 138 may be implemented asappropriate in hardware, computer-executable instructions, firmware, orcombinations thereof. Computer-executable instruction or firmwareimplementations of the processor(s) 138 may include computer-executableor machine-executable instructions written in any suitable programminglanguage to perform the various functions described.

The memory 136 may store program instructions that are loadable andexecutable on the processor(s) 138, as well as data generated during theexecution of these programs. Depending on the configuration and type ofservice provider computers 106, the memory 136 may be volatile (such asrandom access memory (RAM)) and/or non-volatile (such as read-onlymemory (ROM), flash memory, etc.). The service provider computers 106 orservers may also include additional storage 140, which may includeremovable storage and/or non-removable storage. The additional storage140 may include, but is not limited to, magnetic storage, optical disks,and/or tape storage. The disk drives and their associatedcomputer-readable media may provide non-volatile storage ofcomputer-readable instructions, data structures, program modules, andother data for the computing devices. In some implementations, thememory 136 may include multiple different types of memory, such asstatic random access memory (SRAM), dynamic random access memory (DRAM),or ROM.

The memory 136, the additional storage 140, both removable andnon-removable, are all examples of computer-readable storage media. Forexample, computer-readable storage media may include volatile ornon-volatile, removable or non-removable media implemented in any methodor technology for storage of information such as computer-readableinstructions, data structures, program modules, or other data. Thememory 136 and the additional storage 140 are all examples of computerstorage media.

The service provider computers 106 may also contain communicationsconnection(s) 142 that allow the identity interface computers 120 tocommunicate with a stored database, another computing device or server,user terminals, and/or other devices on the networks 108. The serviceprovider computers 106 may also include input/output (I/O) device(s)144, such as a keyboard, a mouse, a pen, a voice input device, a touchinput device, a display, one or more speakers, a printer, etc.

Turning to the contents of the memory 136 in more detail, the memory 136may include an operating system 146 and one or more application programsor services for implementing the features disclosed herein including atleast a warm-up module 148, an out-of-order detection module 150 (e.g.,utilizing the Leslie Lamport algorithm or the like), and/or skip-beatmodule 152. The warm-up module 148 may be configured to enable thewarm-up period described above. The out-of-order detection module 150may be configured to enable detection of out-of-order events, whenevents are received. And, the skip-beat module 152 may be configured todetermine when events have been filtered out, and generate skip-beats aswell as insert them into the streams when appropriate. As used herein,modules may refer to programming modules executed by servers or clustersof servers that are part of a service. In this particular context, themodules may be executed by the servers or clusters of servers that arepart of the service provider computers 106.

FIG. 2 depicts a simplified high level diagram of an event processingsystem 200 that may incorporate an embodiment of the present disclosure.Event processing system 200 may comprise one or more event sources (204,206, 208), an event processing server (EPS) 202 (also referred to as CQService 202) that is configured to provide an environment for processingevent streams, and one or more event sinks (210, 212). The event sourcesgenerate event streams that are received by EPS 202. EPS 202 may receiveone or more event streams from one or more event sources. For example,as shown in FIG. 2, EPS 202 receives an input event stream 214 fromevent source 204, a second input event stream 216 from event source 206,and a third event stream 218 from event source 208. One or more eventprocessing applications (220, 222, and 224) may be deployed on and beexecuted by EPS 202. An event processing application executed by EPS 202may be configured to listen to one or more input event streams, processthe events received via the one or more event streams based uponprocessing logic that selects one or more events from the input eventstreams as notable events. The notable events may then be sent to one ormore event sinks (210, 212) in the form of one or more output eventstreams. For example, in FIG. 2, EPS 202 outputs an output event stream226 to event sink 210, and a second output event stream 228 to eventsink 212. In certain embodiments, event sources, event processingapplications, and event sinks are decoupled from each other such thatone can add or remove any of these components without causing changes tothe other components.

In one embodiment, EPS 202 may be implemented as a Java servercomprising a lightweight Java application container, such as one basedupon Equinox Open Service Gateway Initiative (OSGi), with sharedservices. In some embodiments, EPS 202 may support ultra-high throughputand microsecond latency for processing events, for example, by usingJRockit Real Time. EPS 202 may also provide a development platform(e.g., a complete real time end-to-end Java Event-Driven Architecture(EDA) development platform) including tools (e.g., Oracle CEP Visualizerand Oracle CEP Integrated Development Environment (IDE)) for developingevent processing applications.

An event processing application is configured to listen to one or moreinput event streams, execute logic (e.g., a query) for selecting one ormore notable events from the one or more input event streams, and outputthe selected notable events to one or more event sinks via one or moreoutput event streams. FIG. 2 provides a drilldown for one such eventprocessing application 220. As shown in FIG. 2, event processingapplication 220 is configured to listen to input event stream 218,execute a query 230 comprising logic for selecting one or more notableevents from input event stream 218, and output the selected notableevents via output event stream 228 to event sink 212. Examples of eventsources include, without limitation, an adapter (e.g., Java MessageService (JMS), HTTP, and file), a channel, a processor, a table, acache, and the like. Examples of event sinks include, withoutlimitation, an adapter (e.g., JMS, HTTP, and file), a channel, aprocessor, a cache, and the like.

Although event processing application 220 in FIG. 2 is shown aslistening to one input stream and outputting selected events via oneoutput stream, this is not intended to be limiting. In alternativeembodiments, an event processing application may be configured to listento multiple input streams received from one or more event sources,select events from the monitored streams, and output the selected eventsvia one or more output event streams to one or more event sinks. Thesame query can be associated with more than one event sink and withdifferent types of event sinks.

Due to its unbounded nature, the amount of data that is received via anevent stream is generally very large. Consequently, it is generallyimpractical and undesirable to store or archive all the data forquerying purposes. The processing of event streams requires processingof the events in real time as the events are received by EPS 202 withouthaving to store all the received events data. Accordingly, EPS 202provides a special querying mechanism that enables processing of eventsto be performed as the events are received by EPS 202 without having tostore all the received events.

Event-driven applications are rule-driven and these rules may beexpressed in the form of continuous queries that are used to processinput streams. A continuous query may comprise instructions (e.g.,business logic) that identify the processing to be performed forreceived events including what events are to be selected as notableevents and output as results of the query processing. Continuous queriesmay be persisted to a data store and used for processing input streamsof events and generating output streams of events. Continuous queriestypically perform filtering and aggregation functions to discover andextract notable events from the input event streams. As a result, thenumber of outbound events in an output event stream is generally muchlower than the number of events in the input event stream from which theevents are selected.

Unlike a SQL query that is run once on a finite data set, a continuousquery that has been registered by an application with EPS 202 for aparticular event stream may be executed each time that an event isreceived in that event stream. As part of the continuous queryexecution, EPS 202 evaluates the received event based upon instructionsspecified by the continuous query to determine whether one or moreevents are to be selected as notable events, and output as a result ofthe continuous query execution.

The continuous query may be programmed using different languages. Incertain embodiments, continuous queries may be configured using theContextual Query Language (CQL) provided by Oracle Corporation and usedby Oracle's Complex Events Processing (CEP) product offerings. Oracle'sCQL is a declarative language that can be used to program queries(referred to as CQL queries) that can be executed against event streams.In certain embodiments, CQL is based upon SQL with added constructs thatsupport processing of streaming events data.

In one embodiment, an event processing application may be composed ofthe following component types:

(1) One or more adapters that interface directly to the input and outputstream and relation sources and sinks. Adapters are configured tounderstand the input and output stream protocol, and are responsible forconverting the event data into a normalized form that can be queried byan application processor. Adapters may forward the normalized event datainto channels or output streams and relation sinks. Event adapters maybe defined for a variety of data sources and sinks.

(2) One or more channels that act as event processing endpoints. Amongother things, channels are responsible for queuing event data until theevent processing agent can act upon it.

(2) One or more application processors (or event processing agents) areconfigured to consume normalized event data from a channel, process itusing queries to select notable events, and forward (or copy) theselected notable events to an output channel.

(4) One or more beans are configured to listen to the output channel,and are triggered by the insertion of a new event into the outputchannel. In some embodiments, this user code is a plain-old-Java-object(POJO). The user application can make use of a set of external services,such as JMS, Web services, and file writers, to forward the generatedevents to external event sinks.

(5) Event beans may be registered to listen to the output channel, andare triggered by the insertion of a new event into the output channel.In some embodiments, this user code may use the Oracle CEP event beanAPI so that the bean can be managed by Oracle CEP.

In one embodiment, an event adapter provides event data to an inputchannel. The input channel is connected to a CQL processor associatedwith one or more CQL queries that operate on the events offered by theinput channel. The CQL processor is connected to an output channel towhich query results are written.

In some embodiments, an assembly file may be provided for an eventprocessing application describing the various components of the eventprocessing application, how the components are connected together, eventtypes processed by the application. Separate files may be provided forspecifying the continuous query or business logic for selection ofevents.

It should be appreciated that system 200 depicted in FIG. 2 may haveother components than those depicted in FIG. 2. Further, the embodimentshown in FIG. 2 is only one example of a system that may incorporate anembodiment of the present disclosure. In some other embodiments, system200 may have more or fewer components than shown in FIG. 2, may combinetwo or more components, or may have a different configuration orarrangement of components. System 200 can be of various types includinga personal computer, a portable device (e.g., a mobile telephone ordevice), a workstation, a network computer, a mainframe, a kiosk, aserver, or any other data processing system. In some other embodiments,system 200 may be configured as a distributed system where one or morecomponents of system 200 are distributed across one or more networks inthe cloud.

The one or more of the components depicted in FIG. 2 may be implementedin software, in hardware, or combinations thereof. In some embodiments,the software may be stored in memory (e.g., a non-transitorycomputer-readable medium), on a memory device, or some other physicalmemory and may be executed by one or more processing units (e.g., one ormore processors, one or more processor cores, one or more GPUs, etc.).

Illustrative methods and systems for implementing the hybrid executionof continuous and scheduled queries are described above. Some or all ofthese systems and methods may, but need not, be implemented at leastpartially by architectures and processes such as those shown at least inFIGS. 1-2 above.

FIGS. 3-5 are flowcharts of methods 300, 400, and 500, respectively, forguaranteeing the event order of multi-stage processing in accordancewith an embodiment of the present disclosure. Implementations orprocessing of methods 300, 400, and 500 depicted in FIGS. 3-5 may beperformed by software (e.g., instructions or code modules) when executedby a central processing unit (CPU or processor) of a logic machine, suchas a computer system or information processing device, by hardwarecomponents of an electronic device or application-specific integratedcircuits, or by combinations of software and hardware elements. Each ofthe steps of any of the processes described herein and below may beperformed in any order, may be omitted (or otherwise skipped), may bereplaced by other steps, and/or may be performed repeatedly orrecursively, as desired.

Method 300 depicted in FIG. 3 may begin at 302 where a first event of anevent stream may be determined (or identified) based at least in part ona warmup period that takes place at least until a timer expires. In someexamples, at 304, an event counter may be initialized with a timestampof the first event. Additional events of the event stream may beprocessed at 306. The additional events may have been batched before thetimer expired. In some examples, filtered events may be identified at308. The filtered events may have been filtered out by an upstreamstage. At 310, a skip-beat may be generated and/or inserted into thestream for the filtered event. At 312, subsequent events of the eventstream may be received. In some cases, out-of-order events may beidentified at 314. The method 300 may, in some examples, end at 316 byprocessing subsequent events in order and/or guaranteeing thatsubsequent events will be processed in order. This may be doneindependent of whether each incoming event is an actual event or askip-beat. In other words, even if a skip-beat is received, each eventwill be processed in order. In some examples, a skip-beat is not anactual event because it does not include event data (e.g., it is a dummyevent that enables the CEP engine to continue processing the streamwithout waiting for the event that was filtered).

FIG. 4 is a flowchart of method 400 for guaranteeing the event order ofmulti-stage processing in accordance with an embodiment of the presentdisclosure. Method 400 depicted in FIG. 4 may begin at 402, where atimer may be started. In some examples, events of a stream may bereceived until the timer expires at 404. At 406, the incoming events maybe re-sequenced (or sequenced) in chronological order (e.g., put inorder if they were out of order). The warmup period of method 400 mayend at 408, where a first event is identified as the first event basedat least in part on that event having the highest (oldest) timestamp.

FIG. 5 is a flowchart of method 500 for guaranteeing the event order ofmulti-stage processing in accordance with an embodiment of the presentdisclosure. Method 500 depicted in FIG. 5 may begin at 502, where eventsare received, and it is determined what type of event was received andthe timestamp of the event. In some examples, at 502, if the skip-beator actual event arrives that has a timestamp higher than the nextexpected timestamp, the event is added to a buffer and a timer isstarted. The timer may have a pre-configured expiration interval. At504, more actual events or skip-beats are received. If they havetimestamps higher than the next expected timestamp, they are also addedto the buffer and the timer continues to run. At 506, when an actualevent or skip-beat arrives with a timestamp that is the same as the nextexpected timestamp, the timer can be turned off, and events in thebuffer can be re-sequenced and/or processed. Note, that skip-beats willcontinue to be propagated when appropriate. At 508, when an actual eventor skip-beat arrives with a timestamp lower than the next expectedtimestamp, the event can be discarded as out-of-band. In some examples,the method 500 may end at 510 by re-sequencing and/or processingbuffered events when the timer expires. The method 500 may also continueto propagate skip-beats as desired during this time.

FIG. 6 depicts a simplified diagram of a distributed system 600 forimplementing one of the embodiments. In the illustrated embodiment,distributed system 600 includes one or more client computing devices602, 604, 606, and 608, which are configured to execute and operate aclient application such as a web browser, proprietary client (e.g.,Oracle Forms), or the like over one or more network(s) 610. Server 612may be communicatively coupled with remote client computing devices 602,604, 606, and 608 via network 610.

In various embodiments, server 612 may be adapted to run one or moreservices or software applications provided by one or more of thecomponents of the system. The services or software applications caninclude nonvirtual and virtual environments. Virtual environments caninclude those used for virtual events, tradeshows, simulators,classrooms, shopping exchanges, and enterprises, whether two- orthree-dimensional (3D) representations, page-based logical environments,or otherwise. In some embodiments, these services may be offered asweb-based or cloud services or under a Software as a Service (SaaS)model to the users of client computing devices 602, 604, 606, and/or608. Users operating client computing devices 602, 604, 606, and/or 608may in turn utilize one or more client applications to interact withserver 612 to utilize the services provided by these components.

In the configuration depicted in the figure, the software components618, 620 and 622 of system 600 are shown as being implemented on server612. In other embodiments, one or more of the components of system 600and/or the services provided by these components may also be implementedby one or more of the client computing devices 602, 604, 606, and/or608. Users operating the client computing devices may then utilize oneor more client applications to use the services provided by thesecomponents. These components may be implemented in hardware, firmware,software, or combinations thereof. It should be appreciated that variousdifferent system configurations are possible, which may be differentfrom distributed system 600. The embodiment shown in the figure is thusone example of a distributed system for implementing an embodimentsystem and is not intended to be limiting.

Client computing devices 602, 604, 606, and/or 608 may be portablehandheld devices (e.g., an iPhone®, cellular telephone, an iPad®,computing tablet, a personal digital assistant (PDA)) or wearabledevices (e.g., a Google Glass® head mounted display), running softwaresuch as Microsoft Windows Mobile®, and/or a variety of mobile operatingsystems such as iOS, Windows Phone, Android, BlackBerry 8, Palm OS, andthe like, and being Internet, e-mail, short message service (SMS),Blackberry®, or other communication protocol enabled. The clientcomputing devices can be general purpose personal computers including,by way of example, personal computers and/or laptop computers runningvarious versions of Microsoft Windows®, Apple Macintosh®, and/or Linuxoperating systems. The client computing devices can be workstationcomputers running any of a variety of commercially-available UNIX® orUNIX-like operating systems, including without limitation the variety ofGNU/Linux operating systems, such as for example, Google Chrome OS.Alternatively, or in addition, client computing devices 602, 604, 606,and 608 may be any other electronic device, such as a thin-clientcomputer, an Internet-enabled gaming system (e.g., a Microsoft Xboxgaming console with or without a Kinect® gesture input device), and/or apersonal messaging device, capable of communicating over network(s) 610.

Although exemplary distributed system 600 is shown with four clientcomputing devices, any number of client computing devices may besupported. Other devices, such as devices with sensors, etc., mayinteract with server 612.

Network(s) 610 in distributed system 600 may be any type of networkfamiliar to those skilled in the art that can support datacommunications using any of a variety of commercially-availableprotocols, including without limitation TCP/IP (transmission controlprotocol/Internet protocol), SNA (systems network architecture), IPX(Internet packet exchange), AppleTalk, and the like. Merely by way ofexample, network(s) 610 can be a local area network (LAN), such as onebased on Ethernet, Token-Ring and/or the like. Network(s) 610 can be awide-area network and the Internet. It can include a virtual network,including without limitation a virtual private network (VPN), anintranet, an extranet, a public switched telephone network (PSTN), aninfra-red network, a wireless network (e.g., a network operating underany of the Institute of Electrical and Electronics (IEEE) 602.11 suiteof protocols, Bluetooth®, and/or any other wireless protocol); and/orany combination of these and/or other networks.

Server 612 may be composed of one or more general purpose computers,specialized server computers (including, by way of example, PC (personalcomputer) servers, UNIX® servers, mid-range servers, mainframecomputers, rack-mounted servers, etc.), server farms, server clusters,or any other appropriate arrangement and/or combination. Server 612 caninclude one or more virtual machines running virtual operating systems,or other computing architectures involving virtualization. One or moreflexible pools of logical storage devices can be virtualized to maintainvirtual storage devices for the server. Virtual networks can becontrolled by server 612 using software defined networking. In variousembodiments, server 612 may be adapted to run one or more services orsoftware applications described in the foregoing disclosure. Forexample, server 612 may correspond to a server for performing processingdescribed above according to an embodiment of the present disclosure.

Server 612 may run an operating system including any of those discussedabove, as well as any commercially available server operating system.Server 612 may also run any of a variety of additional serverapplications and/or mid-tier applications, including HTTP (hypertexttransport protocol) servers, FTP (file transfer protocol) servers, CGI(common gateway interface) servers, JAVA® servers, database servers, andthe like. Exemplary database servers include without limitation thosecommercially available from Oracle, Microsoft, Sybase, IBM(International Business Machines), and the like.

In some implementations, server 612 may include one or more applicationsto analyze and consolidate data feeds and/or event updates received fromusers of client computing devices 602, 604, 606, and 608. As an example,data feeds and/or event updates may include, but are not limited to,Twitter® feeds, Facebook® updates or real-time updates received from oneor more third party information sources and continuous data streams,which may include real-time events related to sensor data applications,financial tickers, network performance measuring tools (e.g., networkmonitoring and traffic management applications), clickstream analysistools, automobile traffic monitoring, and the like. Server 612 may alsoinclude one or more applications to display the data feeds and/orreal-time events via one or more display devices of client computingdevices 602, 604, 606, and 608.

Distributed system 600 may also include one or more databases 614 and616. Databases 614 and 616 may reside in a variety of locations. By wayof example, one or more of databases 614 and 616 may reside on anon-transitory storage medium local to (and/or resident in) server 612.Alternatively, databases 614 and 616 may be remote from server 612 andin communication with server 612 via a network-based or dedicatedconnection. In one set of embodiments, databases 614 and 616 may residein a storage-area network (SAN). Similarly, any necessary files forperforming the functions attributed to server 612 may be stored locallyon server 612 and/or remotely, as appropriate. In one set ofembodiments, databases 614 and 616 may include relational databases,such as databases provided by Oracle, that are adapted to store, update,and retrieve data in response to SQL-formatted commands.

FIG. 7 is a simplified block diagram of one or more components of asystem environment 700 by which services provided by one or morecomponents of an embodiment system may be offered as cloud services, inaccordance with an embodiment of the present disclosure. In theillustrated embodiment, system environment 700 includes one or moreclient computing devices 704, 706, and 708 that may be used by users tointeract with a cloud infrastructure system 702 that provides cloudservices. The client computing devices may be configured to operate aclient application such as a web browser, a proprietary clientapplication (e.g., Oracle Forms), or some other application, which maybe used by a user of the client computing device to interact with cloudinfrastructure system 702 to use services provided by cloudinfrastructure system 702.

It should be appreciated that cloud infrastructure system 702 depictedin the figure may have other components than those depicted. Further,the embodiment shown in the figure is only one example of a cloudinfrastructure system that may incorporate an embodiment of thedisclosure. In some other embodiments, cloud infrastructure system 702may have more or fewer components than shown in the figure, may combinetwo or more components, or may have a different configuration orarrangement of components.

Client computing devices 704, 706, and 708 may be devices similar tothose described above for 602, 604, 606, and 608.

Although exemplary system environment 700 is shown with three clientcomputing devices, any number of client computing devices may besupported. Other devices such as devices with sensors, etc. may interactwith cloud infrastructure system 702.

Network(s) 710 may facilitate communications and exchange of databetween clients 704, 706, and 708 and cloud infrastructure system 702.Each network may be any type of network familiar to those skilled in theart that can support data communications using any of a variety ofcommercially-available protocols, including those described above fornetwork(s) 610.

Cloud infrastructure system 702 may comprise one or more computersand/or servers that may include those described above for server 612.

In certain embodiments, services provided by the cloud infrastructuresystem may include a host of services that are made available to usersof the cloud infrastructure system on demand, such as online datastorage and backup solutions, Web-based e-mail services, hosted officesuites and document collaboration services, database processing, managedtechnical support services, and the like. Services provided by the cloudinfrastructure system can dynamically scale to meet the needs of itsusers. A specific instantiation of a service provided by cloudinfrastructure system is referred to herein as a “service instance.” Ingeneral, any service made available to a user via a communicationnetwork, such as the Internet, from a cloud service provider's system isreferred to as a “cloud service.” Typically, in a public cloudenvironment, servers and systems that make up the cloud serviceprovider's system are different from the customer's own on-premisesservers and systems. For example, a cloud service provider's system mayhost an application, and a user may, via a communication network such asthe Internet, on demand, order and use the application.

In some examples, a service in a computer network cloud infrastructuremay include protected computer network access to storage, a hosteddatabase, a hosted web server, a software application, or other serviceprovided by a cloud vendor to a user, or as otherwise known in the art.For example, a service can include password-protected access to remotestorage on the cloud through the Internet. As another example, a servicecan include a web service-based hosted relational database and ascript-language middleware engine for private use by a networkeddeveloper. As another example, a service can include access to an emailsoftware application hosted on a cloud vendor's web site.

In certain embodiments, cloud infrastructure system 702 may include asuite of applications, middleware, and database service offerings thatare delivered to a customer in a self-service, subscription-based,elastically scalable, reliable, highly available, and secure manner. Anexample of such a cloud infrastructure system is the Oracle Public Cloudprovided by the present assignee.

‘Big data’ can be hosted and/or manipulated by the infrastructure systemon many levels and at different scales. Extremely large data sets can bestored and manipulated by analysts and researchers to visualize largeamounts of data, detect trends, and/or otherwise interact with the data.Tens, hundreds, or thousands of processors linked in parallel can actupon such data in order to present it or simulate external forces on thedata or what it represents. These data sets can involve structured data,such as that organized in a database or otherwise according to astructured model, and/or unstructured data (e.g., emails, images, datablobs (binary large objects), web pages, complex event processing). Byleveraging an ability of an embodiment to relatively quickly focus more(or fewer) computing resources upon an objective, the cloudinfrastructure system may be better available to carry out tasks onlarge data sets based on demand from a business, government agency,research organization, private individual, group of like-mindedindividuals or organizations, or other entity.

In various embodiments, cloud infrastructure system 702 may be adaptedto automatically provision, manage and track a customer's subscriptionto services offered by cloud infrastructure system 702. Cloudinfrastructure system 702 may provide the cloud services via differentdeployment models. For example, services may be provided under a publiccloud model in which cloud infrastructure system 702 is owned by anorganization selling cloud services (e.g., owned by Oracle) and theservices are made available to the general public or different industryenterprises. As another example, services may be provided under aprivate cloud model in which cloud infrastructure system 702 is operatedsolely for a single organization and may provide services for one ormore entities within the organization. The cloud services may also beprovided under a community cloud model in which cloud infrastructuresystem 702 and the services provided by cloud infrastructure system 702are shared by several organizations in a related community. The cloudservices may also be provided under a hybrid cloud model, which is acombination of two or more different models.

In some embodiments, the services provided by cloud infrastructuresystem 702 may include one or more services provided under Software as aService (SaaS) category, Platform as a Service (PaaS) category,Infrastructure as a Service (IaaS) category, or other categories ofservices including hybrid services. A customer, via a subscriptionorder, may order one or more services provided by cloud infrastructuresystem 702. Cloud infrastructure system 702 then performs processing toprovide the services in the customer's subscription order.

In some embodiments, the services provided by cloud infrastructuresystem 702 may include, without limitation, application services,platform services and infrastructure services. In some examples,application services may be provided by the cloud infrastructure systemvia a SaaS platform. The SaaS platform may be configured to providecloud services that fall under the SaaS category. For example, the SaaSplatform may provide capabilities to build and deliver a suite ofon-demand applications on an integrated development and deploymentplatform. The SaaS platform may manage and control the underlyingsoftware and infrastructure for providing the SaaS services. Byutilizing the services provided by the SaaS platform, customers canutilize applications executing on the cloud infrastructure system.Customers can acquire the application services without the need forcustomers to purchase separate licenses and support. Various differentSaaS services may be provided. Examples include, without limitation,services that provide solutions for sales performance management,enterprise integration, and business flexibility for largeorganizations.

In some embodiments, platform services may be provided by the cloudinfrastructure system via a PaaS platform. The PaaS platform may beconfigured to provide cloud services that fall under the PaaS category.Examples of platform services may include without limitation servicesthat enable organizations (such as Oracle) to consolidate existingapplications on a shared, common architecture, as well as the ability tobuild new applications that leverage the shared services provided by theplatform. The PaaS platform may manage and control the underlyingsoftware and infrastructure for providing the PaaS services. Customerscan acquire the PaaS services provided by the cloud infrastructuresystem without the need for customers to purchase separate licenses andsupport. Examples of platform services include, without limitation,Oracle Java Cloud Service (JCS), Oracle Database Cloud Service (DBCS),and others.

By utilizing the services provided by the PaaS platform, customers canemploy programming languages and tools supported by the cloudinfrastructure system and also control the deployed services. In someembodiments, platform services provided by the cloud infrastructuresystem may include database cloud services, middleware cloud services(e.g., Oracle Fusion Middleware services), and Java cloud services. Inone embodiment, database cloud services may support shared servicedeployment models that enable organizations to pool database resourcesand offer customers a Database as a Service in the form of a databasecloud. Middleware cloud services may provide a platform for customers todevelop and deploy various business applications, and Java cloudservices may provide a platform for customers to deploy Javaapplications, in the cloud infrastructure system.

Various different infrastructure services may be provided by an IaaSplatform in the cloud infrastructure system. The infrastructure servicesfacilitate the management and control of the underlying computingresources, such as storage, networks, and other fundamental computingresources for customers utilizing services provided by the SaaS platformand the PaaS platform.

In certain embodiments, cloud infrastructure system 702 may also includeinfrastructure resources 730 for providing the resources used to providevarious services to customers of the cloud infrastructure system. In oneembodiment, infrastructure resources 730 may include pre-integrated andoptimized combinations of hardware, such as servers, storage, andnetworking resources to execute the services provided by the PaaSplatform and the SaaS platform.

In some embodiments, resources in cloud infrastructure system 702 may beshared by multiple users and dynamically re-allocated per demand.Additionally, resources may be allocated to users in different timezones. For example, cloud infrastructure system 730 may enable a firstset of users in a first time zone to utilize resources of the cloudinfrastructure system for a specified number of hours and then enablethe re-allocation of the same resources to another set of users locatedin a different time zone, thereby maximizing the utilization ofresources.

In certain embodiments, a number of internal shared services 732 may beprovided that are shared by different components or modules of cloudinfrastructure system 702 and by the services provided by cloudinfrastructure system 702. These internal shared services may include,without limitation, a security and identity service, an integrationservice, an enterprise repository service, an enterprise managerservice, a virus scanning and white list service, a high availability,backup and recovery service, service for enabling cloud support, anemail service, a notification service, a file transfer service, and thelike.

In certain embodiments, cloud infrastructure system 702 may providecomprehensive management of cloud services (e.g., SaaS, PaaS, and IaaSservices) in the cloud infrastructure system. In one embodiment, cloudmanagement functionality may include capabilities for provisioning,managing and tracking a customer's subscription received by cloudinfrastructure system 702, and the like.

In one embodiment, as depicted in the figure, cloud managementfunctionality may be provided by one or more modules, such as an ordermanagement module 720, an order orchestration module 722, an orderprovisioning module 724, an order management and monitoring module 726,and an identity management module 728. These modules may include or beprovided using one or more computers and/or servers, which may begeneral purpose computers, specialized server computers, server farms,server clusters, or any other appropriate arrangement and/orcombination.

In exemplary operation 734, a customer using a client device, such asclient device 704, 706 or 708, may interact with cloud infrastructuresystem 702 by requesting one or more services provided by cloudinfrastructure system 702 and placing an order for a subscription forone or more services offered by cloud infrastructure system 702. Incertain embodiments, the customer may access a cloud User Interface(UI), cloud UI 712, cloud UI 714 and/or cloud UI 716 and place asubscription order via these UIs. The order information received bycloud infrastructure system 702 in response to the customer placing anorder may include information identifying the customer and one or moreservices offered by the cloud infrastructure system 702 that thecustomer intends to subscribe to.

After an order has been placed by the customer, the order information isreceived via the cloud UIs, 712, 714 and/or 716.

At operation 736, the order is stored in order database 718. Orderdatabase 718 can be one of several databases operated by cloudinfrastructure system 718 and operated in conjunction with other systemelements.

At operation 738, the order information is forwarded to an ordermanagement module 720. In some instances, order management module 720may be configured to perform billing and accounting functions related tothe order, such as verifying the order, and upon verification, bookingthe order.

At operation 740, information regarding the order is communicated to anorder orchestration module 722. Order orchestration module 722 mayutilize the order information to orchestrate the provisioning ofservices and resources for the order placed by the customer. In someinstances, order orchestration module 722 may orchestrate theprovisioning of resources to support the subscribed services using theservices of order provisioning module 724.

In certain embodiments, order orchestration module 722 enables themanagement of business processes associated with each order and appliesbusiness logic to determine whether an order should proceed toprovisioning. At operation 742, upon receiving an order for a newsubscription, order orchestration module 722 sends a request to orderprovisioning module 724 to allocate resources and configure thoseresources needed to fulfill the subscription order. Order provisioningmodule 724 enables the allocation of resources for the services orderedby the customer. Order provisioning module 724 provides a level ofabstraction between the cloud services provided by cloud infrastructuresystem 700 and the physical implementation layer that is used toprovision the resources for providing the requested services. Orderorchestration module 722 may thus be isolated from implementationdetails, such as whether or not services and resources are actuallyprovisioned on the fly or pre-provisioned and only allocated/assignedupon request.

At operation 744, once the services and resources are provisioned, anotification of the provided service may be sent to customers on clientdevices 704, 706 and/or 708 by order provisioning module 724 of cloudinfrastructure system 702.

At operation 746, the customer's subscription order may be managed andtracked by an order management and monitoring module 726. In someinstances, order management and monitoring module 726 may be configuredto collect usage statistics for the services in the subscription order,such as the amount of storage used, the amount data transferred, thenumber of users, and the amount of system up time and system down time.

In certain embodiments, cloud infrastructure system 700 may include anidentity management module 728. Identity management module 728 may beconfigured to provide identity services, such as access management andauthorization services in cloud infrastructure system 700. In someembodiments, identity management module 728 may control informationabout customers who wish to utilize the services provided by cloudinfrastructure system 702. Such information can include information thatauthenticates the identities of such customers and information thatdescribes which actions those customers are authorized to performrelative to various system resources (e.g., files, directories,applications, communication ports, memory segments, etc.) Identitymanagement module 728 may also include the management of descriptiveinformation about each customer and about how and by whom thatdescriptive information can be accessed and modified.

FIG. 8 illustrates an exemplary computer system 800, in which variousembodiments of the present disclosure may be implemented. The system 800may be used to implement any of the computer systems described above. Asshown in the figure, computer system 800 includes a processing unit 804that communicates with a number of peripheral subsystems via a bussubsystem 802. These peripheral subsystems may include a processingacceleration unit 806, an I/O subsystem 808, a storage subsystem 818 anda communications subsystem 824. Storage subsystem 818 includes tangiblecomputer-readable storage media 822 and a system memory 810.

Bus subsystem 802 provides a mechanism for letting the variouscomponents and subsystems of computer system 800 communicate with eachother as intended. Although bus subsystem 802 is shown schematically asa single bus, alternative embodiments of the bus subsystem may utilizemultiple buses. Bus subsystem 802 may be any of several types of busstructures including a memory bus or memory controller, a peripheralbus, and a local bus using any of a variety of bus architectures. Forexample, such architectures may include an Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnect (PCI) bus, which can beimplemented as a Mezzanine bus manufactured to the IEEE P1386.1standard.

Processing unit 804, which can be implemented as one or more integratedcircuits (e.g., a conventional microprocessor or microcontroller),controls the operation of computer system 800. One or more processorsmay be included in processing unit 804. These processors may includesingle core or multicore processors. In certain embodiments, processingunit 804 may be implemented as one or more independent processing units832 and/or 834 with single or multicore processors included in eachprocessing unit. In other embodiments, processing unit 804 may also beimplemented as a quad-core processing unit formed by integrating twodual-core processors into a single chip.

In various embodiments, processing unit 804 can execute a variety ofprograms in response to program code and can maintain multipleconcurrently executing programs or processes. At any given time, some orall of the program code to be executed can be resident in processor(s)804 and/or in storage subsystem 818. Through suitable programming,processor(s) 804 can provide various functionalities described above.Computer system 800 may additionally include a processing accelerationunit 806, which can include a digital signal processor (DSP), aspecial-purpose processor, and/or the like.

I/O subsystem 808 may include user interface input devices and userinterface output devices. User interface input devices may include akeyboard, pointing devices such as a mouse or trackball, a touchpad ortouch screen incorporated into a display, a scroll wheel, a click wheel,a dial, a button, a switch, a keypad, audio input devices with voicecommand recognition systems, microphones, and other types of inputdevices. User interface input devices may include, for example, motionsensing and/or gesture recognition devices such as the Microsoft Kinect®motion sensor that enables users to control and interact with an inputdevice, such as the Microsoft Xbox® 360 game controller, through anatural user interface using gestures and spoken commands. Userinterface input devices may also include eye gesture recognition devicessuch as the Google Glass® blink detector that detects eye activity(e.g., ‘blinking’ while taking pictures and/or making a menu selection)from users and transforms the eye gestures as input into an input device(e.g., Google Glass®). Additionally, user interface input devices mayinclude voice recognition sensing devices that enable users to interactwith voice recognition systems (e.g., Siri® navigator), through voicecommands.

User interface input devices may also include, without limitation, threedimensional (3D) mice, joysticks or pointing sticks, gamepads andgraphic tablets, and audio/visual devices such as speakers, digitalcameras, digital camcorders, portable media players, webcams, imagescanners, fingerprint scanners, barcode reader 3D scanners, 3D printers,laser rangefinders, and eye gaze tracking devices. Additionally, userinterface input devices may include, for example, medical imaging inputdevices such as computed tomography, magnetic resonance imaging,position emission tomography, medical ultrasonography devices. Userinterface input devices may also include, for example, audio inputdevices such as MIDI keyboards, digital musical instruments and thelike.

User interface output devices may include a display subsystem, indicatorlights, or non-visual displays such as audio output devices, etc. Thedisplay subsystem may be a cathode ray tube (CRT), a flat-panel device,such as that using a liquid crystal display (LCD) or plasma display, aprojection device, a touch screen, and the like. In general, use of theterm “output device” is intended to include all possible types ofdevices and mechanisms for outputting information from computer system800 to a user or other computer. For example, user interface outputdevices may include, without limitation, a variety of display devicesthat visually convey text, graphics and audio/video information such asmonitors, printers, speakers, headphones, automotive navigation systems,plotters, voice output devices, and modems.

Computer system 800 may comprise a storage subsystem 818 that comprisessoftware elements, shown as being currently located within a systemmemory 810. System memory 810 may store program instructions that areloadable and executable on processing unit 804, as well as datagenerated during the execution of these programs.

Depending on the configuration and type of computer system 800, systemmemory 810 may be volatile (such as random access memory (RAM)) and/ornon-volatile (such as read-only memory (ROM), flash memory, etc.) TheRAM typically contains data and/or program modules that are immediatelyaccessible to and/or presently being operated and executed by processingunit 804. In some implementations, system memory 810 may includemultiple different types of memory, such as static random access memory(SRAM) or dynamic random access memory (DRAM). In some implementations,a basic input/output system (BIOS), containing the basic routines thathelp to transfer information between elements within computer system800, such as during start-up, may typically be stored in the ROM. By wayof example, and not limitation, system memory 810 also illustratesapplication programs 812, which may include client applications, Webbrowsers, mid-tier applications, relational database management systems(RDBMS), etc., program data 814, and an operating system 816. By way ofexample, operating system 816 may include various versions of MicrosoftWindows®, Apple Macintosh®, and/or Linux operating systems, a variety ofcommercially-available UNIX® or UNIX-like operating systems (includingwithout limitation the variety of GNU/Linux operating systems, theGoogle Chrome® OS, and the like) and/or mobile operating systems such asiOS, Windows® Phone, Android® OS, BlackBerry® 8 OS, and Palm® OSoperating systems.

Storage subsystem 818 may also provide a tangible computer-readablestorage medium for storing the basic programming and data constructsthat provide the functionality of some embodiments. Software (programs,code modules, instructions) that when executed by a processor providethe functionality described above may be stored in storage subsystem818. These software modules or instructions may be executed byprocessing unit 804. Storage subsystem 818 may also provide a repositoryfor storing data used in accordance with the present disclosure.

Storage subsystem 800 may also include a computer-readable storage mediareader 820 that can further be connected to computer-readable storagemedia 822. Together and, optionally, in combination with system memory810, computer-readable storage media 822 may comprehensively representremote, local, fixed, and/or removable storage devices plus storagemedia for temporarily and/or more permanently containing, storing,transmitting, and retrieving computer-readable information.

Computer-readable storage media 822 containing code, or portions ofcode, can also include any appropriate media known or used in the art,including storage media and communication media, such as but not limitedto, volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage and/or transmissionof information. This can include tangible, non-transitorycomputer-readable storage media such as RAM, ROM, electronicallyerasable programmable ROM (EEPROM), flash memory or other memorytechnology, CD-ROM, digital versatile disk (DVD), or other opticalstorage, magnetic cassettes, magnetic tape, magnetic disk storage orother magnetic storage devices, or other tangible computer readablemedia. When specified, this can also include nontangible, transitorycomputer-readable media, such as data signals, data transmissions, orany other medium which can be used to transmit the desired informationand which can be accessed by computing system 800.

By way of example, computer-readable storage media 822 may include ahard disk drive that reads from or writes to non-removable, nonvolatilemagnetic media, a magnetic disk drive that reads from or writes to aremovable, nonvolatile magnetic disk, and an optical disk drive thatreads from or writes to a removable, nonvolatile optical disk such as aCD ROM, DVD, and Blu-Ray® disk, or other optical media.Computer-readable storage media 822 may include, but is not limited to,Zip® drives, flash memory cards, universal serial bus (USB) flashdrives, secure digital (SD) cards, DVD disks, digital video tape, andthe like. Computer-readable storage media 822 may also include,solid-state drives (SSD) based on non-volatile memory such asflash-memory based SSDs, enterprise flash drives, solid state ROM, andthe like, SSDs based on volatile memory such as solid state RAM, dynamicRAM, static RAM, DRAM-based SSDs, magnetoresistive RAM (MRAM) SSDs, andhybrid SSDs that use a combination of DRAM and flash memory based SSDs.The disk drives and their associated computer-readable media may providenon-volatile storage of computer-readable instructions, data structures,program modules, and other data for computer system 800.

Communications subsystem 824 provides an interface to other computersystems and networks. Communications subsystem 824 serves as aninterface for receiving data from and transmitting data to other systemsfrom computer system 800. For example, communications subsystem 824 mayenable computer system 800 to connect to one or more devices via theInternet. In some embodiments communications subsystem 824 can includeradio frequency (RF) transceiver components for accessing wireless voiceand/or data networks (e.g., using cellular telephone technology,advanced data network technology, such as 3G, 4G or EDGE (enhanced datarates for global evolution), WiFi (IEEE 602.11 family standards, orother mobile communication technologies, or any combination thereof),global positioning system (GPS) receiver components, and/or othercomponents. In some embodiments communications subsystem 824 can providewired network connectivity (e.g., Ethernet) in addition to or instead ofa wireless interface.

In some embodiments, communications subsystem 824 may also receive inputcommunication in the form of structured and/or unstructured data feeds826, event streams 828, event updates 830, and the like on behalf of oneor more users who may use computer system 800.

By way of example, communications subsystem 824 may be configured toreceive data feeds 826 in real-time from users of social media networksand/or other communication services such as Twitter® feeds, Facebook®updates, web feeds such as Rich Site Summary (RSS) feeds, and/orreal-time updates from one or more third party information sources.

Additionally, communications subsystem 824 may also be configured toreceive data in the form of continuous data streams, which may includeevent streams 828 of real-time events and/or event updates 830, that maybe continuous or unbounded in nature with no explicit end. Examples ofapplications that generate continuous data may include, for example,sensor data applications, financial tickers, network performancemeasuring tools (e.g. network monitoring and traffic managementapplications), clickstream analysis tools, automobile trafficmonitoring, and the like.

Communications subsystem 824 may also be configured to output thestructured and/or unstructured data feeds 826, event streams 828, eventupdates 830, and the like to one or more databases that may be incommunication with one or more streaming data source computers coupledto computer system 800.

Computer system 800 can be one of various types, including a handheldportable device (e.g., an iPhone® cellular phone, an iPad® computingtablet, a PDA), a wearable device (e.g., a Google Glass® head mounteddisplay), a PC, a workstation, a mainframe, a kiosk, a server rack, orany other data processing system.

Due to the ever-changing nature of computers and networks, thedescription of computer system 800 depicted in the figure is intendedonly as a specific example. Many other configurations having more orfewer components than the system depicted in the figure are possible.For example, customized hardware might also be used and/or particularelements might be implemented in hardware, firmware, software (includingapplets), or a combination. Further, connection to other computingdevices, such as network input/output devices, may be employed. Based onthe disclosure and teachings provided herein, a person of ordinary skillin the art will appreciate other ways and/or methods to implement thevarious embodiments.

In the foregoing specification, aspects of the disclosure are describedwith reference to specific embodiments thereof, but those skilled in theart will recognize that the disclosure is not limited thereto. Variousfeatures and aspects of the above-described disclosure may be usedindividually or jointly. Further, embodiments can be utilized in anynumber of environments and applications beyond those described hereinwithout departing from the broader spirit and scope of thespecification. The specification and drawings are, accordingly, to beregarded as illustrative rather than restrictive.

What is claimed is:
 1. A method, comprising: determining a first eventof a sequence of events that are received as part of an event stream;initializing a value of an event counter with a timestamp of the firstevent; processing additional events of the event stream; identifying afiltered event of the event stream; generating a skip-beat for thefiltered event; inserting the skip-beat into the event stream; receivingsubsequent events of the event stream; identifying an out-of-order eventof the event stream; and processing subsequent events in order of thetimestamp associated with each of the subsequent events independent ofwhether a next event in the event stream is an actual event or askip-beat.
 2. The method of claim 1, wherein the first event isdetermined by: starting a timer; receiving a set of events of thesequence of events until the timer expires; re-sequencing the set ofevents in chronological order; and identifying the first event as anevent of the re-sequenced set with a highest timestamp.
 3. The method ofclaim 2, wherein the additional events were batched before the timerexpired.
 4. The method of claim 1, wherein the filtered event wasfiltered out by an upstream stage.
 5. The method of claim 1, wherein theactual event comprises event data corresponding to the event stream. 6.A non-transitory computer-readable medium storing program code that whenexecuted by a processor of a computing system causes the processor toperform operations comprising: determining a first event of a sequenceof events that are received as part of an event stream; initializing avalue of an event counter with a timestamp of the first event;processing additional events of the event stream; identifying a filteredevent of the event stream; generating a skip-beat for the filteredevent; inserting the skip-beat into the event stream; receivingsubsequent events of the event stream; identifying an out-of-order eventof the event stream; and processing subsequent events in order of thetimestamp associated with each of the subsequent events independent ofwhether a next event in the event stream is an actual event or askip-beat.
 7. The non-transitory computer-readable medium of claim 6,wherein the first event is determined by: starting a timer; receiving aset of events of the sequence of events until the timer expires;re-sequencing the set of events in chronological order; and identifyingthe first event as an event of the re-sequenced set with a highesttimestamp.
 8. The non-transitory computer-readable medium of claim 7,wherein the additional events were batched before the timer expired. 9.The non-transitory computer-readable medium of claim 6, wherein thefiltered event was filtered out by an upstream stage.
 10. Thenon-transitory computer-readable medium of claim 9, wherein at least oneof the additional events or the filtered event are received as part ofthe event stream.
 11. The non-transitory computer-readable medium ofclaim 6, wherein the out-of-order event is discarded.
 12. A system,comprising: a memory configured to store computer-executableinstructions; and a processor configured to access the memory andexecute the computer-executable instructions to at least: determine afirst event of a sequence of events that are received as part of anevent stream; initialize a value of an event counter with a timestamp ofthe first event; process additional events of the event stream; identifya filtered event of the event stream; generate a skip-beat for thefiltered event; insert the skip-beat into the event stream; receivesubsequent events of the event stream; identify an out-of-order event ofthe event stream; and process subsequent events in order of thetimestamp associated with each of the subsequent events independent ofwhether a next event in the event stream is an actual event or askip-beat.
 13. The system of claim 12, wherein the processor furtherexecutes the computer-executable instructions to at least: start atimer; receive a set of events of the sequence of events until the timerexpires; re-sequence the set of events in chronological order; andidentify the first event as an event of the re-sequenced set with ahighest timestamp.
 14. The system of claim 13, wherein the additionalevents were batched before the timer expired.
 15. The system of claim12, wherein the filtered event was filtered out by an upstream stage.16. The system of claim 12, wherein the first event is received as partof an event stream.
 17. The system of claim 16, wherein at least one ofthe additional events or the filtered event are received as part of theevent stream.